/**
 * Copyright (c) 2015 www.smarthome.com All rights reserved. <br />
 * 本软件源代码版权归xxxx公司,未经许可不得任意复制与传播.<br />
 *
 */
package com.smarthome.core.workingmonitor.impl;

import java.util.List;

import javax.annotation.Resource;

import org.slf4j.Logger;
import org.springframework.stereotype.Service;

import com.smarthome.base.service.ShWorkerService;
import com.smarthome.core.workingmonitor.WorkerService;
import com.smarthome.domain.bean.ShWorker;
import com.smarthome.domain.enums.WorkerJobStatusEnum;

@Service("workerService")
public class WorkerServiceImpl implements WorkerService {

    protected static Logger LOGGER;

    @Resource
    private ShWorkerService shWorkerService;

    @Override
    public List<ShWorker> getAliveWorkers() {
        ShWorker shWorker = new ShWorker();
        shWorker.setStatus(WorkerJobStatusEnum.AVAILABLE.getStatus());// 状态,1可用,2不可用
        return shWorkerService.selectEntryList(shWorker);
    }

}
